#include "HashTable.h"

void TestHashTable()
{
  HashTable<string, size_t> table;
  string arr[] = {"苹果", "香蕉", "菠萝", "苹果", "香蕉", "菠萝", "橘子"};
  for(const auto& e : arr)
  {
    HashData<string, size_t>* ret = table.Find(e);
    if(ret)
    {
      ret->_kv.second++;
    }
    else 
    {
      table.Insert(make_pair(e, 1));
    }
  }
  table.PrintfHashTable();
}

int main()
{
  TestHashTable();
  return 0;
}
